home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / xview / genial / ui / display.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-14  |  1.5 KB  |  80 lines

  1. /*
  2.  * display.c
  3.  */
  4.  
  5. #include <stdio.h>
  6. #include <sys/param.h>
  7. #include <sys/types.h>
  8. #include <xview/xview.h>
  9. #include <xview/panel.h>
  10. #include <xview/textsw.h>
  11. #include <xview/xv_xrect.h>
  12. /* #include <gdd.h> */
  13. #include "display_ui.h"
  14.  
  15. /*
  16.  * Notify callback function for `gamma'.
  17.  */
  18. void
  19. gamma_proc(item, value, event)
  20.     Panel_item item;
  21.     int       value;
  22.     Event    *event;
  23. {
  24.     float     v = (float) value * 4 / 100 + 1;
  25.     printf("setting gamma to:%f\n", v);
  26.     set_gam(v);
  27. #ifdef DEBUG
  28.     fprintf(stderr, "display: gamma_proc: value: %d\n", value);
  29. #endif
  30. }
  31.  
  32. /*
  33.  * Notify callback function for `shrink_fac'.
  34.  */
  35. void
  36. shrink_proc(item, value, event)
  37.     Panel_item item;
  38.     int       value;
  39.     Event    *event;
  40. {
  41.     set_shrink_fac(value);
  42. #ifdef DEBUG
  43.     fprintf(stderr, "display: shrink_proc: value: %u\n", value);
  44. #endif
  45. }
  46.  
  47. /*
  48.  * Notify callback function for `cmap_min'.
  49.  */
  50. Panel_setting
  51. cm_min_proc(item, event)
  52.     Panel_item item;
  53.     Event    *event;
  54. {
  55.     int       value = (int) xv_get(item, PANEL_VALUE);
  56.  
  57.     set_cmin(value);
  58. #ifdef DEBUG
  59.     fprintf(stderr, "display: cm_min_proc: value: %d\n", value);
  60. #endif
  61.     return panel_text_notify(item, event);
  62. }
  63.  
  64. /*
  65.  * Notify callback function for `cmap_max'.
  66.  */
  67. Panel_setting
  68. cm_max_proc(item, event)
  69.     Panel_item item;
  70.     Event    *event;
  71. {
  72.     int       value = (int) xv_get(item, PANEL_VALUE);
  73.  
  74.     set_cmax(value);
  75. #ifdef DEBUG
  76.     fprintf(stderr, "display: cm_max_proc: value: %d\n", value);
  77. #endif
  78.     return panel_text_notify(item, event);
  79. }
  80.